package com.iemes.controller.pretest.datastatistics;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.inject.Inject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.iemes.controller.base.BaseResponse;
import com.iemes.controller.index.BaseController;
import com.iemes.entity.PretestDentsityFormMap;
import com.iemes.entity.PretestHooperFormMap;
import com.iemes.mapper.pretest.PreDailyProductionMapper;
import com.iemes.util.Common;
import com.iemes.util.FormMap;

@RequestMapping("/daily/")
@Controller
public class PreDailyProController extends BaseController {
		
	//日生产报表
	@Inject
	private PreDailyProductionMapper  predailyductionmapper;
	/**
	 * 取报表数据方法（公共） 
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("dailydata")
	public String dailydata(Model model){
		model.addAttribute("res", findByRes());
		
		return Common.BACKGROUND_PATH + "/pretest/datastatistics/welcome";
	}
	
	
	
	@ResponseBody
	@RequestMapping("getDailyData")
	public BaseResponse getDailyData() throws Exception{
		BaseResponse response = new BaseResponse();
			List<Map<String, Object>> list = null;
			list = predailyductionmapper.getTodayPro();
	
			response.setResult(true);
			response.setData(list);
			response.setMessage("执行成功");
			return response;
	}
	
	
	
}
